<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>
<head>
<!-- Copyright 1997 The Open Group, All Rights Reserved -->
<title>more</title>
</head><body bgcolor=white>
<center>
<font size=2>
The Single UNIX &reg; Specification, Version 2<br>
Copyright &copy; 1997 The Open Group

</font></center><hr size=2 noshade>
<h4><a name = "tag_001_014_1460">&nbsp;</a>NAME</h4><blockquote>
more - display files on a page-by-page basis
</blockquote><h4><a name = "tag_001_014_1461">&nbsp;</a>SYNOPSIS</h4><blockquote>
<pre><code>

more <b>[</b>-ceisu<b>][</b>-n <i>number</i><b>][</b>-p <i>command</i><b>][</b>-t <i>tagstring</i><b>][</b><i>file</i>...<b>]</b>

more <b>[</b>-ceisu<b>][</b>-n <i>number</i><b>][</b>+<i>command</i><b>][</b>-t <i>tagstring</i><b>][</b><i>file</i>...<b>]</b>
</code>
</pre>
</blockquote><h4><a name = "tag_001_014_1462">&nbsp;</a>DESCRIPTION</h4><blockquote>
The
<i>more</i>
utility reads files and either writes them
to the terminal on a page-by-page basis
or filters them to standard output.
If standard output is not a terminal device,
all input files are copied to standard output in their
entirety,
without modification.
If standard output is a terminal device,
the files will be written a number of lines
(one screenful) at a time under the control of
user commands; see the EXTENDED DESCRIPTION section.
<p>
Certain block-mode terminals do not have all the capabilities
necessary to support the complete
<i>more</i>
definition;
they are incapable of accepting commands that
are not terminated with a
newline character.
Implementations that support such terminals
provide an operating mode to
<i>more</i>
in which all commands can be terminated with a
newline character
on those terminals.
This mode will:
<ul>
<p>
<li>
be documented in the system documentation
<p>
<li>
at invocation,
inform the user of the terminal deficiency that requires the
newline character
usage and provide instructions on how this warning
can be suppressed in future invocations
<p>
<li>
not be required for implementations supporting
only fully capable terminals
<p>
<li>
not affect commands already requiring newline characters
<p>
<li>
not affect users on the capable terminals from using
<i>more</i>
as described in this specification
<p>
</ul>
</blockquote><h4><a name = "tag_001_014_1463">&nbsp;</a>OPTIONS</h4><blockquote>
The
<i>more</i>
utility supports the <b>XBD</b> specification, <a href="../xbd/utilconv.html#usg"><b>Utility Syntax Guidelines</b>&nbsp;</a> ,
except that
<i>+command</i>
of the obsolescent version uses a non-standard syntax.
<p>
The following options are supported:
<dl compact>

<dt><b>-c</b>
<dd>If a screen is to be written that has no lines in common with
the current screen, or
<i>more</i>
is writing its first screen,
<i>more</i>
will not scroll the screen, but instead will redraw each line
of the screen in turn, from the top of the screen to the bottom.
In addition, if
<i>more</i>
is writing its first screen, the screen will be cleared.
This option may be ignored on devices that do
not have the ability to clear to the end of a line or the end of a screen.

<dt><b>-e</b>
<dd>Exit immediately after writing the last line of the last file
in the argument list; see the EXTENDED DESCRIPTION section.

<dt><b>-i</b>
<dd>Perform pattern matching in searches without regard to case.
See
the <b>XBD</b> specification, <a href="../xbd/re.html#tag_007_002"><b>Regular Expression General Requirements</b>&nbsp;</a>  .

<dt><b>-n&nbsp;</b><i>number</i>
<dd>
Specify the number of lines per screenful.
The
<i>number</i>
argument is a positive decimal integer.
The
<b>-n</b>
option overrides any values obtained from the environment.

<dt><b>-p&nbsp;</b><i>command</i>
<dd>

<dt>+<i>command</i><dd>
For each file examined,
initially execute the
<i>more</i>
command in the
<i>command</i>
argument.
If the command is a positioning command,
such as a line number or a
regular expression search,
set the current position (see the EXTENDED DESCRIPTION section)
to represent the final results of the command,
without writing any intermediate lines of the file.
For example, the two commands:
<pre>
<code>
more -p 1000j file
more -p 1000G file
</code>
</pre>
would be equivalent and start the display with the
current position at line 1000,
bypassing the lines that
<b>j</b>
would write and scroll off the screen if it had been issued
during the file examination.
If the positioning command is unsuccessful, the first line in the file
will be the current position.

<dt><b>-s</b>
<dd>Replace consecutive empty lines with a single empty line.

<dt><b>-t&nbsp;</b><i>tagstring</i>
<dd>
Write the screenful of the file containing the tag named by the
<i>tagstring</i>
argument.
See the
<i><a href="ctags.html">ctags</a></i>
utility.
The tags feature represented by
<b>-t</b>&nbsp;<i>tagstring</i>
and the
<b>:t</b>
command is optional.
It is provided on any system that
also provides
a conforming
implementation of
<i><a href="ctags.html">ctags</a></i>;
otherwise, the use of
<b>-t</b>
produces undefined results.

<dt><b>-u</b>
<dd>Treat a
backspace character
as a printable control character, displayed as an implementation-dependent
character sequence (see the EXTENDED DESCRIPTION section),
suppressing backspacing and the special handling that produces underlined
or standout-mode text on some terminal types.
Also, do not ignore a
carriage-return
character at the end of a line.

</dl>
<p>
If both the
<b>-t</b>&nbsp;<i>tagstring</i>
and
<b>-p</b>&nbsp;<i>command</i>
(or the obsolescent
<i>+command</i>)
options are given, the
<b>-t</b>&nbsp;<i>tagstring</i>
will be processed first; that is,
the file containing the tag is selected by
<b>-t</b>
and then the command is executed.
</blockquote><h4><a name = "tag_001_014_1464">&nbsp;</a>OPERANDS</h4><blockquote>
The following operand is supported:
<dl compact>

<dt><i>file</i><dd>A pathname of an input file.
If no
<i>file</i>
operands are specified, the standard input will be used.
If a
<i>file</i>
is "-", the standard input will be read at that point in the sequence.

</dl>
</blockquote><h4><a name = "tag_001_014_1465">&nbsp;</a>STDIN</h4><blockquote>
The standard input will be used only if no
<i>file</i>
operands are specified, or if a
<i>file</i>
operand is "-".
</blockquote><h4><a name = "tag_001_014_1466">&nbsp;</a>INPUT FILES</h4><blockquote>
The input files being examined must be text files.
If standard output is a terminal,
standard error will be used to read commands from the user.
If standard output is a terminal, standard error is not readable,
and command input is needed,
<i>more</i>
will terminate with an error
indicating that it was unable to read user commands.
If standard output is not a terminal,
no error will result if standard error cannot be
opened for reading.
</blockquote><h4><a name = "tag_001_014_1467">&nbsp;</a>ENVIRONMENT VARIABLES</h4><blockquote>
The following environment variables affect the execution of
<i>more</i>:
<dl compact>

<dt><i>COLUMNS</i><dd>
Override the system-selected horizontal screen size.
See
the <b>XBD</b> specification, <a href="../xbd/envvar.html"><b>Environment Variables</b>&nbsp;</a> 
for valid values and results when it is unset or null.

<dt><i>EDITOR</i><dd>
Used by the
<b>v</b>
command to select an editor;
see the EXTENDED DESCRIPTION section.

<dt><i>LANG</i><dd>Provide a default value for the internationalisation variables
that are unset or null.
If
<i>LANG</i>
is unset or null, the corresponding value from the
implementation-dependent default locale will be used.
If any of the internationalisation variables contains an invalid setting, the
utility will behave as if none of the variables had been defined.

<dt><i>LC_ALL</i><dd>
If set to a non-empty string value,
override the values of all the other internationalisation variables.

<dt><i>LC_COLLATE</i><dd>
Determine the locale for the
behaviour of ranges, equivalence classes
and multi-character collating elements
within regular expressions.

<dt><i>LC_CTYPE</i><dd>
Determine the
locale for the interpretation of sequences of bytes of text data as
characters (for example, single- as opposed to multi-byte characters
in arguments and input files) and
the behaviour of character classes within regular expressions.

<dt><i>LC_MESSAGES</i><dd>
Determine the locale that should be used to affect
the format and contents of diagnostic
messages written to standard error
and informative messages written to standard output.

<dt><i>NLSPATH</i><dd>
Determine the location of message catalogues
for the processing of
<i>LC_MESSAGES .
</i>
<dt><i>LINES</i><dd>Override the system-selected vertical screen size,
used as the number of lines in a screenful.
See
the <b>XBD</b> specification, <a href="../xbd/envvar.html"><b>Environment Variables</b>&nbsp;</a> 
for valid values and results when it is unset or null.
The
<b>-n</b>
option takes precedence over the
<i>LINES</i>
variable for determining the number of lines in a screenful.

<dt><i>MORE</i><dd>Determine a
string containing options described in the OPTIONS section
preceded with hyphens and
blank-character-separated
as on the command line.
Any command-line options are processed after
those in the
<i>MORE</i>
variable, as if the command line were:
<pre>
<code>
more $MORE <i>options</i> <i>operands</i>
</code>
</pre>

The
<i>MORE</i>
variable takes precedence over the
<i>TERM</i>
and
<i>LINES</i>
variables for determining the number of lines in a screenful.

<dt><i>TERM</i><dd>Determine the name of the terminal type.
If this variable is
unset or null, an unspecified
default terminal type will be used.

</dl>
</blockquote><h4><a name = "tag_001_014_1468">&nbsp;</a>ASYNCHRONOUS EVENTS</h4><blockquote>
Default.
</blockquote><h4><a name = "tag_001_014_1469">&nbsp;</a>STDOUT</h4><blockquote>
The standard output will be used to write the contents of the input files.
</blockquote><h4><a name = "tag_001_014_1470">&nbsp;</a>STDERR</h4><blockquote>
Used for diagnostic messages and user commands (see the
INPUT FILES section),
and, if standard output is a terminal device, to write a prompting string.
The prompting string will only appear as the last line of the screen and
will contain the name of the file currently being examined, but it is
otherwise unspecified.
User input for the
<b>/</b>,
<b>?</b>,
<b>:e</b>
and
<b>:t</b>
commands will be written on the same line of the screen as the prompt.
It is unspecified if informational messages are written for other user
commands.
</blockquote><h4><a name = "tag_001_014_1471">&nbsp;</a>OUTPUT FILES</h4><blockquote>
None.
</blockquote><h4><a name = "tag_001_014_1472">&nbsp;</a>EXTENDED DESCRIPTION</h4><blockquote>
The number of lines available per screen is determined by the
<b>-n</b>
option, if present or by examining values in the environment (see
the ENVIRONMENT VARIABLES section).
If neither method yields a number, an unspecified number of
lines will be used.
The actual number of lines written will be one
less than this number, as the last line of the screen will be used
to write a user prompt and user input.
If the number of lines available
per screen is less than four, the results are undefined.
<p>
In the following descriptions, the
<i>current position</i>
refers to two things:
<ul>
<p>
<li>
the position of the current line on the screen
<p>
<li>
the line number (in the file) of the current line on the screen.
<p>
</ul>
<p>
Usually, the line on the screen corresponding to the current position is
the third line on the screen.
If this is not possible (there are fewer
than three lines to display or this is the first page of the file,
or it is the last page of the file), then the current position is
either the first or last line on the screen as described later.
<p>
The number of columns available per line is determined by examining
values in the environment (see the ENVIRONMENT VARIABLES section),
with a default value as described in
the <b>XBD</b> specification, <a href="../xbd/envvar.html"><b>Environment Variables</b>&nbsp;</a> .
The
<i>more</i>
utility writes lines containing more characters
than would fit into this number of columns
by breaking the line into one or more logical lines
where each of these lines but the last contains the number of
characters needed to fill the columns.
The logical lines are written independently
of each other; that is,
commands affecting a single line affect them separately.
<p>
When standard output is a terminal and
<b>-u</b>
is not specified,
<i>more</i>
treats
backspace characters
and carriage-return characters
specially:
<ul>
<p>
<li>
A character, followed first by a
backspace character,
then by an underscore
(_),
will cause that character to be written
as underlined text, if the terminal type supports that.
An underscore, followed first by a
backspace character,
then any character, will also cause that character to be written
as underlined text, if the terminal type supports that.
<p>
<li>
A
backspace character
that appears between two
identical printable characters will cause
the first of those two characters to be written
as emboldened text (that is,
visually brighter, standout mode or inverse-video mode),
if the terminal type supports that, and the
second to be discarded.
Immediately subsequent occurrences of
backspaces/character pairs for that
same character will also be discarded.
(For example, the sequence
a\ba\ba\ba
is interpreted as a single emboldened
a.)
<p>
<li>
Other
backspace character
sequences will be written directly to the terminal,
which generally cause the character preceding the
backspace character
to be suppressed in the display.
<p>
<li>
A carriage-return character
at the end of a line will be ignored,
rather than being written as a control character,
as described in the next paragraph.
<p>
</ul>
<p>
It is implementation-dependent how other non-printable characters are written.
Implementations should use the same format that they use for the
<i><a href="ex.html">ex</a></i>
<b>print</b>
command.
<p>
If the
<b>-t</b>
option was specified,
<i>more</i>
will write a screen of the file containing the specified tag
in the current position.
<p>
If the
<b>-p</b>
option was specified,
<i>more</i>
will execute the command supplied in the
<i>command</i>
option-argument, and write the screen so that the
current position is the current position that
would result from applying that command to the input file.
<p>
If neither the
<b>-p</b>
or
<b>-t</b>
options were specified,
<i>more</i>
will write the first screen of the first input file.
<p>
Once the initial screen has been written,
<i>more</i>
will prompt the user and,
based on the interactive user input, will modify the screen or exit.
If the modification of the screen results in a screen that has lines in
common with the current screen,
<i>more</i>
will scroll the screen rather than
clearing and redrawing the screen
(unless the
<b>-c</b>
option is specified).
If the modification of the screen
results in a screen that has no lines
in common with the current screen,
<i>more</i>
will clear and redraw the screen.
<p>
If the standard output is not a terminal device,
<i>more</i>
will always exit when
it reaches end-of-file on the last file in its argument list.
Otherwise, for all
files but the last,
<i>more</i>
will prompt, with an indication
that it has reached the end-of-file, along with the name of
the next file.
For the last file specified, or for the
standard input if no file is specified,
<i>more</i>
will prompt,
indicating end-of-file, and accept additional commands.
If the next command specifies forward scrolling,
<i>more</i>
will exit.
If the
<b>-e</b>
option is specified,
<i>more</i>
will exit
immediately after writing the last line of the last file.
<p>
Several of the commands described in this section move the current position
backwards in the input stream.
In the case that text is being taken from a
non-rewindable stream, such as a pipe, it is implementation-dependent how much
backward motion is supported.
<p>
If a scrolling command cannot be performed
because there are insufficient lines
to scroll,
<i>more</i>
will alert the terminal.
The scrolling commands are
b,
&lt;control&gt;-B,
d,
&lt;control&gt;-D,
f,
&lt;control&gt;-F,
g,
G,
j,
k,
s,
u
and
&lt;control&gt;-U.
<p>
The interactive commands in the following sections are supported.
Some commands can
be preceded by a decimal integer, called
<i>count</i>
in the following descriptions.
If not specified with the command,
<i>count</i>
defaults to 1.
<p>
In the following descriptions,
<i>pattern</i>
is a basic regular expression, as described in
the <b>XBD</b> specification, <a href="../xbd/re.html#tag_007_003"><b>Basic Regular Expressions</b>&nbsp;</a> .
The term &quot;examine&quot; is historical usage meaning &quot;open
the file for viewing&quot;; for example,
<i>more</i>
<b>foo</b>
would be expressed as examining file
<b>foo</b>.
<h5><a name = "tag_001_014_1472_001">&nbsp;</a>Help</h5>
<pre>
<code>
<i>Synopsis</i>:   h
</code>
</pre>
<p>
Write a summary of these commands
and other implementation-dependent commands.
<h5><a name = "tag_001_014_1472_002">&nbsp;</a>Move Forward One Screenful</h5>
<pre>
<code>
<i>Synopsis</i>:   <b>[</b><i>count</i><b>]</b>f
<i>Synopsis</i>:   <b>[</b><i>count</i><b>]</b>&lt;control&gt;-F
</code>
</pre>
<p>
Move forward
<i>count</i>
lines, with a default of one screenful.
At end-of-file,
<i>more</i>
will continue with the next file in the list, or exit if the current
file is the last file in the list.
<h5><a name = "tag_001_014_1472_003">&nbsp;</a>Move Backward One Screenful</h5>
<pre>
<code>
<i>Synopsis</i>:   <b>[</b><i>count</i><b>]</b>b
<i>Synopsis</i>:   <b>[</b><i>count</i><b>]</b>&lt;control&gt;-B
</code>
</pre>
<p>
Move backward
<i>count</i>
lines, with a default of one screenful (see option
<b>-n</b>).
If
<i>count</i>
is more than the screen size, only the final screenful will be written.
<h5><a name = "tag_001_014_1472_004">&nbsp;</a>Scroll Forward One Line</h5>
<pre>
<code>
<i>Synopsis</i>:   <b>[</b><i>count</i><b>]</b>&lt;space&gt;
<i>Synopsis</i>:   <b>[</b><i>count</i><b>]</b>j
<i>Synopsis</i>:   <b>[</b><i>count</i><b>]</b>&lt;newline&gt;
</code>
</pre>
<p>
Scroll forward
<i>count</i>
lines.
The default
<i>count</i>
for the
space character
will be one screenful; for
j
and
newline character,
one line.
The entire
<i>count</i>
lines will be written, even if
<i>count</i>
is more than the screen size.
At end-of-file, a
newline character
will cause
<i>more</i>
to continue with the next file in the list, or exit if the current file
is the last file in the list.
<h5><a name = "tag_001_014_1472_005">&nbsp;</a>Scroll Backward One Line</h5>
<pre>
<code>
<i>Synopsis</i>:   <b>[</b><i>count</i><b>]</b>k
</code>
</pre>
<p>
Scroll backward
<i>count</i>
lines, with a default of 1.
The entire
<i>count</i>
lines will be written, even if
<i>count</i>
is more than the screen size.
<h5><a name = "tag_001_014_1472_006">&nbsp;</a>Scroll Forward One Half Screenful</h5>
<pre>
<code>
<i>Synopsis</i>:   <b>[</b><i>count</i><b>]</b>d
<i>Synopsis</i>:   <b>[</b><i>count</i><b>]</b>&lt;control&gt;-D
</code>
</pre>
<p>
Scroll forward
<i>count</i>
lines, with a default of one half of the screen size.
If
<i>count</i>
is specified, it will become the new default for
subsequent
<b>d</b>
and
<b>u</b>
commands.
<h5><a name = "tag_001_014_1472_007">&nbsp;</a>Skip Forward One Line</h5>
<pre>
<code>
<i>Synopsis</i>:   <b>[</b><i>count</i><b>]</b>s
</code>
</pre>
<p>
Skip forward
<i>count</i>
lines, with a default of 1, and write the next screenful
beginning at that point.
If
<i>count</i>
would cause the current position to be such
that less than one screenful would be written, the last
screenful in the file will be written.
<h5><a name = "tag_001_014_1472_008">&nbsp;</a>Scroll Backward One Half Screenful</h5>
<pre>
<code>
<i>Synopsis</i>:   <b>[</b><i>count</i><b>]</b>u
<i>Synopsis</i>:   <b>[</b><i>count</i><b>]</b>&lt;control&gt;-U
</code>
</pre>
<p>
Scroll backward
<i>count</i>
lines, with a default of one half of the screen size.
If
<i>count</i>
is specified, it will become the new default for
subsequent
<b>d</b>
and
<b>u</b>
commands.
<h5><a name = "tag_001_014_1472_009">&nbsp;</a>Go to Beginning of File</h5>
<pre>
<code>
<i>Synopsis</i>:   <b>[</b><i>count</i><b>]</b>g
</code>
</pre>
<p>
Go to line
<i>count</i>
in the file, with a default of 1 (beginning of file).
Scroll or rewrite the screen so that that line is at the current position.
<h5><a name = "tag_001_014_1472_010">&nbsp;</a>Go to End-of-file</h5>
<pre>
<code>
<i>Synopsis</i>:   <b>[</b><i>count</i><b>]</b>G
</code>
</pre>
<p>
Go to line
<i>count</i>
in the file, with a default of the end of the file.
If no
<i>count</i>
is specified, scroll or rewrite the screen so that the last line
in the file is at the bottom of the screen.
If
<i>count</i>
is specified,
scroll or rewrite the screen so that that line is at the current position.
<h5><a name = "tag_001_014_1472_011">&nbsp;</a>Refresh the Screen</h5>
<pre>
<code>
<i>Synopsis</i>:   r
<i>Synopsis</i>:   &lt;control&gt;-L
</code>
</pre>
<p>
Refresh the screen.
<h5><a name = "tag_001_014_1472_012">&nbsp;</a>Discard and Refresh</h5>
<pre>
<code>
<i>Synopsis</i>:   R
</code>
</pre>
<p>
Refresh the screen, discarding any buffered input.
If the current
file is non-seekable, buffered input will not be discarded and the
<b>R</b>
command is equivalent to the
<b>r</b>
command.
<h5><a name = "tag_001_014_1472_013">&nbsp;</a>Mark Position</h5>
<pre>
<code>
<i>Synopsis</i>:   m<i>letter
</i></code>
</pre>
<p>
Mark the current position with the letter named by
<i>letter</i>,
where
<i>letter</i>
represents the name of one of the lower-case letters of the
portable character set.
When a new file is examined, all marks may be lost.
<h5><a name = "tag_001_014_1472_014">&nbsp;</a>Return to Mark</h5>
<pre>
<code>
<i>Synopsis</i>:   '<i>letter</i>
</code>
</pre>
<p>
Return to the position that
was previously marked with the letter named by
<i>letter</i>,
making that line the current position.
<h5><a name = "tag_001_014_1472_015">&nbsp;</a>Return to Previous Position</h5>
<pre>
<code>
<i>Synopsis</i>:   &quot;
</code>
</pre>
<p>
Return to the position from which the last large movement command was
executed (where a &quot;large movement&quot;
is defined as any movement of more than
a screenful of lines).
If no such movements have been made, return to
the beginning of the file.
<h5><a name = "tag_001_014_1472_016">&nbsp;</a>Search Forward for Pattern</h5>
<p><code>
<i>Synopsis</i>:   
<b>[</b><i>count</i><b>]</b>/<b>[</b>!<b>]</b><i>pattern</i>&lt;newline&gt;
</code>
<p>
Search forward in the file for the
<i>count</i>th
line containing the
<i>pattern</i>.
The
<i>count</i>
defaults to 1.
The search will start at
the line following the current position.
If the search is successful, the screen will be modified so that the
searched-for line is
in the current position.
The null regular expression
(/
followed by a
newline character)
will repeat the search using the previous regular expression.
If the character
"!"
is included, the lines for searching will be those
that do not contain the
<i>pattern</i>.
<p>
If a match is found for the
<i>pattern</i>,
the logical line containing the pattern will be written in the
current position.
If the matching line is
already on the screen, the screen will be scrolled to
make that line the current position;
otherwise, a full screen will be written.
If no match is found for the
pattern, a message to that effect will be written as a
part of the prompt, and the screen and the current position
will remain unchanged.
However, if no match is found and
the input is the standard input, the screen may be scrolled
to the last screenful of the input.
<h5><a name = "tag_001_014_1472_017">&nbsp;</a>Search Backward for Pattern</h5>
<p><code>
<i>Synopsis</i>:   
<b>[</b><i>count</i><b>]</b>?<b>[</b>!<b>]</b><i>pattern</i>&lt;newline&gt;
</code>
<p>
Search backward in the file for the
<i>count</i>th
line containing the
<i>pattern</i>.
The search will start at the line immediately before the
current position.
If the search is successful, the screen will be modified so that the
searched-for line is in the current position.
The null regular expression
(?
followed by a
newline character)
will repeat the search using the previous regular expression.
If the character
"!"
is included, the lines for searching will be those
that do not contain the
<i>pattern</i>.
<p>
If a match is found for the
<i>pattern</i>,
the logical line containing
the pattern will be written in
the current position.
If the matching line is
already on the screen, the screen will be scrolled to
make that line the current position;
otherwise, a full screen will be written.
If no match is found for the
pattern, a message to that effect will be written as a
part of the prompt, and the screen and the current position
will remain unchanged.
However, if no match is found and
the input is the standard input, the screen may be scrolled
to the last screenful of the input.
<h5><a name = "tag_001_014_1472_018">&nbsp;</a>Repeat Search</h5>
<p><code>
<i>Synopsis</i>:   
<b>[</b><i>count</i><b>]</b>n
</code>
<p>
Repeat the previous search for
<i>count</i>th
line (default 1) containing the last
<i>pattern</i>
(or not containing the last
<i>pattern</i>,
if the previous search
was
/!
or
?!).
<h5><a name = "tag_001_014_1472_019">&nbsp;</a>Repeat Search in Reverse</h5>
<p><code>
<i>Synopsis</i>:   
<b>[</b><i>count</i><b>]</b>N
</code>
<p>
Repeat the search in the opposite direction of the previous search for the
<i>count</i>th
line (default 1) containing the last
<i>pattern</i>
(or not containing the last
<i>pattern</i>,
if the previous search
was
/!
or
?!).
<h5><a name = "tag_001_014_1472_020">&nbsp;</a>Examine New File</h5>
<p><code>
<i>Synopsis</i>:   
:e <b>[</b><i>filename</i><b>]</b>&lt;newline&gt;
</code>
<p>
Examine a new file.
If the
<i>filename</i>
argument is not specified, the current file (see the
<b>:n</b>
and
<b>:p</b>
commands
below) from the list of files in the command line will be reexamined.
The
<i>filename</i>
will be subjected to the process of shell
word expansions (see
<xref href=wordexp><a href="chap2.html#tag_001_006">
Word Expansions
</a></xref>);
if more than a single pathname results, the
effects are unspecified.
If
<i>filename</i>
is a number sign
(#),
the previously examined file
will be reexamined.
If
<i>filename</i>
refers to a non-seekable file,
the results are unspecified.
<h5><a name = "tag_001_014_1472_021">&nbsp;</a>Examine Next File</h5>
<p><code>
<i>Synopsis</i>:   
<b>[</b><i>count</i><b>]</b>:n
</code>
<p>
Examine the next file.
If a number
<i>count</i>
is specified,
the
<i>count</i>th
next file will be examined.
If
<i>filename</i>
refers to a non-seekable file,
the results are unspecified.
<h5><a name = "tag_001_014_1472_022">&nbsp;</a>Examine Previous File</h5>
<p><code>
<i>Synopsis</i>:   
<b>[</b><i>count</i><b>]</b>:p
</code>
<p>
Examine the previous file.
If a number
<i>count</i>
is specified, the
<i>count</i>th
previous file will be examined.
If
<i>filename</i>
refers to
a non-seekable file,
the results are unspecified.
<h5><a name = "tag_001_014_1472_023">&nbsp;</a>Go to Tag</h5>
<p><code>
<i>Synopsis</i>:   :t <i>tagstring</i>&lt;newline&gt;
</code>
<p>
Go to the supplied
<i>tagstring</i>
and scroll/rewrite the screen
with that line in the current position;
see the
<b>-t</b>
option.
If the
<i><a href="ctags.html">ctags</a></i>
utility is not supported by the system, the use of
:t
produces undefined results.
<h5><a name = "tag_001_014_1472_024">&nbsp;</a>Invoke Editor</h5>
<pre>
<code>
<i>Synopsis</i>:   v
</code>
</pre>
<p>
Invoke an editor to edit the current file being examined.
If standard input is being examined,
the results are unspecified.
The name of the editor will be taken from the environment variable
<i>EDITOR ,
</i>or defaults to
<i><a href="vi.html">vi</a></i>.
If
<i>EDITOR</i>
represents either
<i><a href="vi.html">vi</a></i>
or
<i><a href="ex.html">ex</a></i>,
the editor will be invoked
with options such that the current editor line is the physical line
corresponding to the current position in
<i>more</i>
at the time of invocation.
For example, either
<i><a href="ex.html">ex</a></i>
or
<i><a href="vi.html">vi</a></i>
is invoked by specifying
the editor name and following that with
<b>-c</b>&nbsp;<i>linenumber</i>.
It is implementation-dependent whether line-setting
options are passed to editors other than
<i><a href="vi.html">vi</a></i>
and
<i><a href="ex.html">ex</a></i>.
<p>
The file types that can be edited are implementation-dependent.
<p>
When the editor exits,
<i>more</i>
will resume on the current file
by rewriting the screen with the current line
as the current position.
<h5><a name = "tag_001_014_1472_025">&nbsp;</a>Display Position</h5>
<pre>
<code>
<i>Synopsis</i>:   =
<i>Synopsis</i>:   &lt;control&gt;-G
</code>
</pre>
<p>
Write the name of the file currently being examined,
the number
relative to the total number of files there are to examine, the current
line number, the current byte number and the total bytes to write and
what percentage of the file
precedes the current position.
If
<i>more</i>
is reading from standard input,
or the file is shorter than a single screen, some
of these items need not be written.
All of these items will reference
the first byte of the line after the last line written.
<h5><a name = "tag_001_014_1472_026">&nbsp;</a>Quit</h5>
<pre>
<code>
<i>Synopsis</i>:   q
<i>Synopsis</i>:   :q
<i>Synopsis</i>:   ZZ
</code>
</pre>
<p>
Exit
<i>more</i>.
</blockquote><h4><a name = "tag_001_014_1473">&nbsp;</a>EXIT STATUS</h4><blockquote>
The following exit values are returned:
<dl compact>

<dt>0<dd>Successful completion.

<dt>&gt;0<dd>An error occurred.

</dl>
</blockquote><h4><a name = "tag_001_014_1474">&nbsp;</a>CONSEQUENCES OF ERRORS</h4><blockquote>
If an error is encountered accessing a file when using the
<b>:n</b>
command,
<i>more</i>
will attempt to examine the next file in the argument list,
but the final exit status will be affected.
If an error is encountered accessing a file via the
<b>:p</b>
command,
<i>more</i>
will attempt to examine the previous
file in the argument list, but the final exit status will be affected.
If an error is encountered accessing a file via the
<b>:e</b>
command,
<i>more</i>
will remain in the current file and the final exit status will not
be affected.
</blockquote><h4><a name = "tag_001_014_1475">&nbsp;</a>APPLICATION USAGE</h4><blockquote>
The operating mode referred to for block-mode terminals
effectively adds a newline character
to each synopsis line that currently has none.
So, for example,
<b>d</b>&lt;newline&gt;
would page one screenful.
The mode could be triggered by a command-line option,
environment variable or some other method.
<p>
When the standard output is not a terminal, none of
the filter-modification options are effective.
This is based on historical practice.
For example, a typical implementation of
<i><a href="man.html">man</a></i>
pipes its output through
<i>more</i>
<b>-s</b>
to squeeze excess white space for terminal users.
When
<i><a href="man.html">man</a></i>
is piped to
<i><a href="lp.html">lp</a></i>,
however, it is undesirable for this squeezing to happen.
</blockquote><h4><a name = "tag_001_014_1476">&nbsp;</a>EXAMPLES</h4><blockquote>
The
<b>-p</b>
allows arbitrary commands to be executed at the
start of each file.
Examples are:
<dl compact>

<dt><i>more&nbsp;</i>-p&nbsp;G&nbsp;<i>file1&nbsp;file2</i><dd>
Examine each file starting with its last screenful.

<dt><i>more&nbsp;</i>-p&nbsp;100&nbsp;<i>file1&nbsp;file2</i><dd>
Examine each file starting with line 100 in the current position
(usually the third line, so line 98 would be the first
line written).

<dt><i>more&nbsp;</i>-p&nbsp;/100&nbsp;<i>file1&nbsp;file2</i><dd>
Examine each file starting with the first line
containing the string
100
in the current position

</dl>
</blockquote><h4><a name = "tag_001_014_1477">&nbsp;</a>FUTURE DIRECTIONS</h4><blockquote>
The IEEE PASC 1003.2 Interpretations Committee has forwarded concerns about
parts of this interface definition to the IEEE PASC 1003.2 Interpretations Committee
which is identifying the corrections.
A future revision of this specification will align with
IEEE Std. 1003.2b when finalised.
</blockquote><h4><a name = "tag_001_014_1478">&nbsp;</a>SEE ALSO</h4><blockquote>
None.
</blockquote><hr size=2 noshade>
<center><font size=2>
UNIX &reg; is a registered Trademark of The Open Group.<br>
Copyright &copy; 1997 The Open Group
<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]

</font></center><hr size=2 noshade>
</body></html>
